home *** CD-ROM | disk | FTP | other *** search
/ C!T ROM 3 / ct-rom iiib.zip / ct-rom iiib / WINDOWS / DIVERSEN / WINE02BX / C-MODE.ELC < prev    next >
Text File  |  1993-03-28  |  14KB  |  141 lines

  1. ;;; compiled by @win386 on Sat Mar 13 14:30:32 1993
  2. ;;; from file c:/src/lucid-19.4/lisp/modes/c-mode.el
  3. ;;; emacs version 19.3 Lucid.
  4. ;;; bytecomp version 2.08; 27-aug-92.
  5. ;;; optimization is on.
  6. ;;; this file uses opcodes which do not exist in Emacs18.
  7.  
  8. (if (and (boundp 'emacs-version)
  9.      (or (and (boundp 'epoch::version) epoch::version)
  10.          (string-lessp emacs-version "19")))
  11.     (error "This file was compiled for Emacs19."))
  12.  
  13. (defvar c-mode-abbrev-table nil "\
  14. Abbrev table in use in C-mode buffers.")
  15. (define-abbrev-table 'c-mode-abbrev-table nil)
  16. (defvar c-mode-map nil "\
  17. Keymap used in C mode.")
  18. (byte-code "¼â┴ ┬├─#ê┬┼─#ê┬╞╟#ê┬╚╔#ê┬╩╦#ê┬╠═#ê┬╬╧#ê┬╨╤#ê┬╥╙#ê┬╘╒#ê┬╓╫#ç" [c-mode-map make-sparse-keymap define-key "{" electric-c-brace "}" ";" electric-c-semi "#" electric-c-sharp-sign ":" electric-c-terminator "{" c-insert-braces "" mark-c-function "" indent-c-exp "q" c-fill-paragraph "" backward-delete-char-untabify "    " c-indent-command] 4)
  19. (autoload 'c-macro-expand "cmacexp" "\
  20. Display the result of expanding all C macros occurring in the region.
  21. The expansion is entirely correct because it uses the C preprocessor." t)
  22. (defvar c-mode-syntax-table nil "\
  23. Syntax table in use in C-mode buffers.")
  24. (byte-code "¼╦┴ ┬├─#ê┬┼╞#ê┬╟╚#ê┬╔╩#ê┬╦╩#ê┬╠╩#ê┬═╩#ê┬╬╩#ê┬╧╩#ê┬╨╩#ê┬╤╩#ê┬╥╙#ê┴ç" [c-mode-syntax-table make-syntax-table modify-syntax-entry 92 "\\" 47 ". 14" 42 ". 23" 43 "." 45 61 37 60 62 38 124 39 "\""] 4)
  25. (defconst c-indent-level 2 "\
  26. *Indentation of C statements with respect to containing block.")
  27. (defconst c-brace-imaginary-offset 0 "\
  28. *Imagined indentation of a C open brace that actually follows a statement.")
  29. (defconst c-brace-offset 0 "\
  30. *Extra indentation for braces, compared with other text in same context.")
  31. (defconst c-argdecl-indent 5 "\
  32. *Indentation level of declarations of C function arguments.")
  33. (defconst c-label-offset -2 "\
  34. *Offset of C label lines and case statements relative to usual indentation.")
  35. (defconst c-continued-statement-offset 2 "\
  36. *Extra indent for lines not starting new statements.")
  37. (defconst c-continued-brace-offset 0 "\
  38. *Extra indent for substatements that start with open-braces.
  39. This is in addition to c-continued-statement-offset.")
  40. (defconst c-auto-newline nil "\
  41. *Non-nil means automatically newline before and after braces,
  42. and after colons and semicolons, inserted in C code.
  43. If you do not want a leading newline before braces then use:
  44.   (define-key c-mode-map \"{\" 'electric-c-semi)")
  45. (defconst c-tab-always-indent t "\
  46. *Non-nil means TAB in C mode should always reindent the current line,
  47. regardless of where in the line point is when the TAB command is used.")
  48. (fset 'c-mode #[nil "└ ê┴\n!ê├┼╔\n!ê╦╠!ê═P ╦╧!ê ╦╨!ê╤╦╥!ê╙╦╘!ê╒╦╓!ê╤╦╫!ê╪╦┘!ê┌╦█!ê▄╦▌!ê▐╦▀!êα╦ß!ê╤!Γπ!ç" [kill-all-local-variables use-local-map c-mode-map c-mode major-mode "C" mode-name c-mode-abbrev-table local-abbrev-table set-syntax-table c-mode-syntax-table make-local-variable paragraph-start "^$\\|" page-delimiter paragraph-separate paragraph-ignore-fill-prefix t indent-line-function c-indent-line indent-region-function c-indent-region require-final-newline comment-start "/* " comment-end " */" comment-column 32 comment-start-skip "/\\*+ *" comment-indent-hook c-comment-indent parse-sexp-ignore-comments run-hooks c-mode-hook] 2 "\
  49. Major mode for editing C code.
  50. Expression and list commands understand all C brackets.
  51. Tab indents for C code.
  52. Comments are delimited with /* ... */.
  53. Paragraphs are separated by blank lines only.
  54. Delete converts tabs to spaces as it moves back.
  55. \\{c-mode-map}
  56. Variables controlling indentation style:
  57.  c-tab-always-indent
  58.     Non-nil means TAB in C mode should always reindent the current line,
  59.     regardless of where in the line point is when the TAB command is used.
  60.  c-auto-newline
  61.     Non-nil means automatically newline before and after braces,
  62.     and after colons and semicolons, inserted in C code.
  63.  c-indent-level
  64.     Indentation of C statements within surrounding block.
  65.     The surrounding block's indentation is the indentation
  66.     of the line on which the open-brace appears.
  67.  c-continued-statement-offset
  68.     Extra indentation given to a substatement, such as the
  69.     then-clause of an if or body of a while.
  70.  c-continued-brace-offset
  71.     Extra indentation given to a brace that starts a substatement.
  72.     This is in addition to c-continued-statement-offset.
  73.  c-brace-offset
  74.     Extra indentation for line if it starts with an open brace.
  75.  c-brace-imaginary-offset
  76.     An open brace following other text is treated as if it were
  77.     this far to the right of the start of its line.
  78.  c-argdecl-indent
  79.     Indentation level of declarations of C function arguments.
  80.  c-label-offset
  81.     Extra indentation for line that is a label, or case or default.
  82.  
  83. Settings for K&R and BSD indentation styles are
  84.   c-indent-level                5    8
  85.   c-continued-statement-offset  5    8
  86.   c-brace-offset               -5   -8
  87.   c-argdecl-indent              0    8
  88.   c-label-offset               -5   -8
  89.  
  90. Turning on C mode calls the value of the variable c-mode-hook with no args,
  91. if that value is non-nil." nil])
  92. (fset 'c-comment-indent #[nil "└┴!½é┬ç`è┬yê└─!½ê┼╞!êiT¬Ñ└╟!¼à└╚!½â╔¬ÿ bê╩╦xê ┬U½ån½â┬¬àiT ]*ç" [looking-at "^/\\*" 0 opoint "[     ]*}[     ]*\\($\\|/\\*\\)" search-forward "}" "^#[     ]*endif[     ]*" "^#[     ]*else[     ]*" 7 "     " nil comment-column] 2])
  93. (fset 'c-fill-paragraph #[(&optional arg) "è└yê┴┬wê├ !)ë¼å╞ ╟=½┘è└yê├╚!½è╔ !ê╩i╦\"¬É½â╠yê`═╬╟!╟\"ê`{)╨P╨Pîeè╙╘┬╒#ê╠yê`)}ê╓!êè╙╘!ê└yê├╪!¡é┘ -¬ä╓!)ç" [0 "     " nil looking-at comment-start-skip first-line calculate-c-indent t "[     ]*/\\*.*\\*/" re-search-forward make-string 32 1 move-to-column calculate-c-indent-within-comment paragraph-start "\\|^[     ]*/\\*[     ]*$\\|^[     ]*\\*/[     ]*$\\|^[^     /*]" paragraph-separate fill-prefix search-forward "*/" move fill-paragraph arg "[     ]*\\*/" delete-indentation] 6 "\
  94. Like \\[fill-paragraph] but handle C comments.
  95. If point is inside a comment, the current paragraph of the comment
  96. is filled, preserving the comment indentation or line-starting decorations." "P"])
  97. (fset 'electric-c-brace #[(arg) "└\n¼╢l½│è├└xên)¼ë ½º┼ ê╞ êcê┼ ê ½è╞ ê`╚Z┼ êè    ½ä    Tbê╔╩!ê)    ½îè    bê╦╠\n!!)¬æ═V½å╬Z╦╠\n!!)ç" [nil insertpos arg "     " c-auto-newline c-indent-line newline last-command-char 2 delete-char -1 self-insert-command prefix-numeric-value 127 128] 3 "\
  98. Insert character and correct line's indentation." "P"])
  99. (byte-code "└┴Mê┬├Mç" [c-insert-brackets #[nil "└cêè┴c)ç" [91 93] 1 nil nil] c-insert-braces #[nil "└┴!ê┬ ê├ êè┬ ê─cê├ )ç" [electric-c-brace 1 newline c-indent-line 125] 2 nil nil]] 2)
  100. (fset 'electric-c-sharp-sign #[(arg) "è└┴xên)½ç┴├ !)ç┼╞ !!ç" ["     " nil c-auto-newline electric-c-terminator arg self-insert-command prefix-numeric-value] 3 "\
  101. Insert character and correct line's indentation." "P"])
  102. (fset 'electric-c-semi #[(arg) "½ä┴\n!ç├─\n!!ç" [c-auto-newline electric-c-terminator arg self-insert-command prefix-numeric-value] 3 "\
  103. Insert character and correct line's indentation." "P"])
  104. (fset 'electric-c-terminator #[(arg) "└` ¼φl½Ωè─yê┼└wêg╞U«┤╚=½ö╔╩!¼Åè╦└wê┼└wê`    W)«Ü╠ ê═`    \"╧8«è╨8«ä╤8))¼ªcê╥ ê½Ä╘ ¼è╒ ê`╓Z╥ êè\n½ä\nTbê╫╪!ê)\n½îè\nbê┘┌ !!)¬à┘┌ !!*ç" [nil end insertpos arg 0 "     " 35 last-command-char 58 looking-at "case[     '/(]" "a-zA-Z0-9_$" beginning-of-defun parse-partial-sexp pps 3 4 5 c-indent-line c-auto-newline c-inside-parens-p newline 2 delete-char -1 self-insert-command prefix-numeric-value] 3 "\
  105. Insert character and correct line's indentation." "P"])
  106. (fset 'c-inside-parens-p #[nil "└┴┬Åç" [nil (byte-code "èî`└ ê`}êdbê┴`┬├#«üef─U*ç" [beginning-of-defun scan-lists -1 1 40] 4) ((error))] 3])
  107. (fset 'c-indent-command #[(&optional whole-exp) "½╡┴ ┬ëè½â╟yêè╚yê`)` W½î╔╚!ê`╩┬wê¬o) V¡å╦ ╠$+ç¼îè═┬xên)¼â╬ ç┴ ç" [whole-exp c-indent-line nil end beg shift-amt c-tab-always-indent 0 1 forward-sexp "     \n" indent-code-rigidly "#" "     " insert-tab] 5 "\
  108. Indent current line as C code, or in some cases insert a tab character.
  109. If c-tab-always-indent is non-nil (the default), always indent current line.
  110. Otherwise, indent the current line only if point is at the left margin
  111. or in the line's indentation; otherwise insert a tab.
  112.  
  113. A numeric argument, regardless of its value,
  114. means indent rigidly all the lines of the expression starting after point
  115. so that this line becomes properly indented.
  116. The relative indentation among the lines of the expression are preserved." "P"])
  117. (fset 'c-indent-line #[nil "└┴!┴ëëd`Z╟yê`┴=½ç╚ é¬╔=½å╩ ¬²╦╠!½à╟¬≤═┴wê<½à@╦╬!¼É╦╧!½ûè╨╤!ê╦╥!)½ï╤\\]¬┼╦╘!½É╦╒!¼ïè╓ ê╚ )¬░╦╫!½æè╪ )½ïè╪ ê╚ )¬Üg┘U½ëZ¬îg█U½ç\\═┴wêiZë╟U½Äd\nZ`V½¢d\nZbê¬ö`|êjêd\nZ`V½àd\nZbê -ç" [calculate-c-indent nil pos case-fold-search shift-amt beg indent 0 current-indentation t calculate-c-indent-within-comment looking-at "[     ]*#" "     " "case[     '/(]" "[A-Za-z]" forward-sexp 1 ":" c-label-offset "else\\b" "else\\s_" c-backward-to-start-of-if "while\\b" c-backward-to-start-of-do 125 c-indent-level 123 c-brace-offset] 7 "\
  118. Indent current line as C code.
  119. Return the amount the indentation changed by."])
  120. (fset 'calculate-c-indent #[(&optional parse-start) "è└yê`┴ëë½åbê¬â╟ ê`W½Å`╚`└#ëA@¬l╔ 8¼à╩ 8½å╩ 8éw\n¼┼bê╦┴wêg╠U½ä└éw═«üe!êè╬╧┴╨#ê╤╥!½£╤╙!½ù└òSbê╘╒!ê`W½ëg╓>¼ä¬ü└)éw\nf╠U¼ê\nTbêiéwbê═\n!êh╪=¼ûh┘=½ª`┌Zf█=¼ë`┌Zfz▄>½òh╪=½ç▌uê▐\n!ê└yê═\n!ê¬Ph▀>¼¼èbê╦┴wêgαU)¼₧▐\n!ê!ièbê╦┴wêg)╠=½ä\"¬ü└\\\\¬ⁿ\nbêè╒uê└#Σ┴wê╤σ!½¿gµU½à╒yê¬mgτU½ï┌uêΦΘ┴╨#ê¬]è┴ê`#)ΦΩ!ê¬O`W¡Ä#`V½çδ ,Z¬üi*«½n½ì-└U½ç.!\\¬é-╦┴xên½â└¬é/h≡=½ä╘▌!êδ \\\\-ç" [0 nil containing-sexp state case-fold-search indent-point parse-start beginning-of-defun parse-partial-sexp 3 4 "     " 123 c-backward-to-noncomment re-search-backward "^[^      \n#]" move looking-at "\\sw\\|\\s_" "[^\"\n=]*(" forward-sexp 1 (44 59) c-argdecl-indent 44 58 2 39 (119 95) -1 c-backward-to-start-of-continued-exp (nil 44 59 125 123) 125 c-continued-statement-offset c-continued-brace-offset colon-line-end "     \n" "#\\|/\\*\\|case[     \n'/(].*:\\|[a-zA-Z0-9_$]*:" 35 47 search-forward "*/" ":" current-indentation c-label-offset c-indent-level c-brace-offset c-brace-imaginary-offset 41] 5 "\
  121. Return appropriate indentation for current line as C code.
  122. In usual case returns an integer: the column to indent to.
  123. Returns nil if line starts inside a string, t if in a comment."])
  124. (fset 'calculate-c-indent-within-comment #[(&optional after-star) "└ëè├yê─└wêg┼U╞└xê`├yê─└wê½ë╚╔!½ä╩╦!ê╩╠\n═#½î    ½ë¼à├öTbê╚╬!½ëh┼U½äiT¬üi+ç" [nil star-start end 0 "     " 42 "     \n" after-star looking-at "\\*" re-search-forward "\\*[     ]*" "/\\*[     ]*" t "[     ]*$"] 4 "\
  125. Return the indentation amount for line inside a block comment.
  126. Non-nil arg AFTER-STAR means, if lines in the comment have a leading star,
  127. return the indentation of the text that would follow this star."])
  128. (byte-code "└┴Mê┬├Mç" [c-backward-to-noncomment #[(lim) "└ë    ?¡╩├ xê`` ┼\\Y½Æè╞uê╟╚!)½ê╔╩ ╦#ê¬]` X«¥è╠yê`┼Zf═=½ê╬uê╠yê¬m╧└wê╟╨!)?ë¼7╠yê¬2*ç" [nil stop opoint "     \n " lim 2 -2 looking-at "\\*/" search-backward "/*" move 0 92 -1 "     " "#"] 5] c-backward-to-start-of-continued-exp #[(lim) "h└>½ä┴┬!ê├yê` X½ä Tbê┼╞wç" [(41 34) forward-sexp -1 0 lim "     " nil] 2]] 2)
  129. (fset 'c-backward-to-start-of-if #[(&optional limit) "¼çè┴ ê`)┬├o?¡¬╞U?¡ñ╟┬!ê╚╔!½àT¬h╚╩!½àS¬^`W½Y╞bê¬R*ç" [limit beginning-of-defun 1 nil case-fold-search if-level 0 backward-sexp looking-at "else\\b" "if\\b"] 2 "\
  130. Move to the start of the last ``unbalanced'' if."])
  131. (fset 'c-backward-to-start-of-do #[(&optional limit) "¼çè┴ ê`)┬`├ ¼╔`├╚╔Åê ¼╗╩╦!½ä╠¬▓è═╬!ê¼àh╧U«ô╨╤┬½êh╧U¼â╥¬ü╬$)½ä╙¬è├`W½é╙)¬4 ╠=½â┬¬äbê├+ç" [limit beginning-of-defun t nil done startpos first next-start (backward-sexp 1) ((error (byte-code "└└ç" [fail done] 1))) looking-at "do\\b" succeed forward-sexp 1 125 search-forward ";" 2 fail] 6 "\
  132. If point follows a `do' statement, move to beginning of it and return `t'.
  133. Otherwise return `nil' and don't move point."])
  134. (fset 'mark-c-function #[nil "└`!ê┴ ê└`!ê┬ ê├ ê─ ç" [push-mark end-of-defun beginning-of-defun backward-paragraph zmacs-activate-region] 2 "\
  135. Put mark at end of C function, point at beginning." nil])
  136. (fset 'indent-c-exp #[(&optional endpos) "└C` ½ÿ└è┼uê╞ ê`)î `}ê└╟╚Å*¬ü`C    └\n└ └ └└└└└└└└└╓è╪┼!ê)è`┌è└ê`)▄#½á▌`└ë%▀8?¡àα8?)½åß ê╓yê*è└ m?à₧ ½à` W¬â ?à₧└¼╧m½å▄ë ¼╞▌`└ê`└ë%ë@AA@½ÉAA@╓Y½çAA@Γ8½âπ ê▀8½à┼yê¬3▄ë½1 ½½╓W½ÑΣ    └C\"Σ    └C\"    TTσ¢σ8Táê¬U ?¡ä╓Xë äçσ8V½É    A    A    Së¬iU¼â└W½Æ└    B└    B    Të¬i    @¼æ    A@«çè╪µ!ê`)áê┼yêτ└wêläç    @½Θ    @╓Y½π    @fΦU¼å    @¬∞èΘΩ!gΦUΘδ!∞\n!êhφ>¼ÿε    @!ê/i½ä0¬ü╓\\\\¬í½è±\n!ê≥ ¬ô½ï≤\n!½å≥ ¬ä    @)¬ù⌠    @½à    @[¬ü\n!5    5ëáê)Θ÷!¼ÉΘ≈!½öè╪┼!êΘ°!)½ë┼9\\]g·U½ç;ZgΦU½ç<\\l½â╓iU¼Ég²U¼ï`╓yê`|êjêΘ!äç`┌è└ê`)▄#½á▌`└ë%▀8?¡àα8?)½åß ê╓yê)éç.ç" [nil indent-stack opoint endpos funbeg 1 beginning-of-defun (byte-code "è└┴!ê`)ç" [backward-up-list 1] 2) ((error (byte-code "`ç" [funbeg opoint] 1))) contain-stack case-fold-search restart outer-loop-done inner-loop-done state ostate this-indent last-sexp at-else at-brace at-while last-depth 0 next-depth forward-sexp beg re-search-forward comment-start-skip t parse-partial-sexp new-state 3 5 indent-for-comment 4 c-indent-line append 6 -1 "     " 123 looking-at "else\\W" "while\\b" c-backward-to-noncomment (nil 44 59 125 58 123) c-backward-to-start-of-continued-exp c-continued-statement-offset c-continued-brace-offset c-backward-to-start-of-if current-indentation c-backward-to-start-of-do calculate-c-indent val "case[     '/(]" "[A-Za-z]" ":" c-label-offset 125 c-indent-level c-brace-offset 35] 7 "\
  137. Indent each line of the C grouping following point.
  138. If optional arg ENDPOS is given, indent each line, stopping when
  139. ENDPOS is encountered." nil])
  140. (fset 'c-indent-region #[(start end) "èbê┴\n!n½ål¼â─ ê┼ !ê ╞ëô*ç" [start copy-marker end endmark c-indent-line indent-c-exp nil] 3])
  141.